
/**
 *  路径匹配
 * @params {string } path
 * @return {boolean}
 */
function isPathMatch(pattern,path) {  
    const regexPattern = pattern.replace(/\//g,'\\/').replace(/\*\*/g,'.*').replace(/\*/g,'[^\\/]*')
    const regex = new RegExp(`^${regexPattern}$`)
    return regex.test(path)
}